-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Bug 1886894 Clear sessionStorage in browsingData remove options #41609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bug 1886894 Clear sessionStorage in browsingData remove options #41609
Conversation
Rob--W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented on specific lines; please double check if there are any inconsistencies in other places in the browsingData API docs that need to be updated.
I haven't checked whether all (un)supported options are correctly listed; I'll do that at the next review pass.
| - : `boolean`. IndexedDB data. | ||
| - `localStorage` {{optional_inline}} | ||
| - : `boolean`. Local storage data. | ||
| - : `boolean`. Local and session storage data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion with the storage.local and storage.session extension APIs, could you reference localStorage and sessionStorage API docs (with this spelling)? E.g. local storage (localStorage) and session storage (sessionStorage), with the API names between braces pointing to the API docs.
The generic term is web storage (but most people know it by local storage, I guess?). API docs that encompasses both storage APIs: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
| Values of this type are objects. They contain these properties: | ||
|
|
||
| - `cookieStoreId` {{optional_inline}} | ||
| - : `string`. This property only applies to cookies and indexedDB items. The removal is limited to items belonging to a specific [cookie store](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore) as specified by the ID. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enumeration should mention localStorage too.
files/en-us/mozilla/add-ons/webextensions/api/browsingdata/removelocalstorage/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mozilla/add-ons/webextensions/api/browsingdata/removelocalstorage/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mozilla/add-ons/webextensions/api/browsingdata/removelocalstorage/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Rob Wu <[email protected]>
…Data.remove-options
pepelsbey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from the editorial perspective. Thanks! Just a nit in the release notes.
Rob--W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. I did not check the existing source to see if there is other stuff that might have been missed, but I assume that you did that.
|
|
||
| This is an asynchronous function that returns a [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). | ||
| - clear records of web pages visited after a given time. | ||
| - control whether to clear records of web pages or web pages and extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"web pages or web pages and extensions" reads a bit ambiguous. How about this:
| - control whether to clear records of web pages or web pages and extensions. | |
| - control whether to clear records of web pages, or web pages and extensions. |
| - clear local and session storage objects created after a given time. | ||
| - control whether to clear localStorage and sessionStorage objects created by web pages or web pages extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"objects" -> "values". The localStorage/sessionStorage APIs only store strings, so it's a bit strange to refer to it as objects. This was already a pre-existing issue, but since we're editing this anyway...
| - clear local and session storage objects created after a given time. | |
| - control whether to clear localStorage and sessionStorage objects created by web pages or web pages extensions. | |
| - clear local and session storage values created after a given time. | |
| - control whether to clear localStorage and sessionStorage values created by web pages or web pages extensions. |
|
|
||
| - `removalOptions` | ||
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which may be used to clear only local storage objects created by normal web pages or to clear objects created by hosted apps and extensions as well. | ||
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear local and session storage objects stored after a given time, and control whether to clear local and session storage objects created by web pages or web pages and extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested edit for consistency with earlier methods.
But note: Firefox does NOT support "since" with removeLocalStorage (or the localStorage) option. This should be documented in BCD/MDN. Chrome does support it.
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear local and session storage objects stored after a given time, and control whether to clear local and session storage objects created by web pages or web pages and extensions. | |
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear localStorage and sessionStorage values stored after a given time, and control whether to clear localStorage and sessionStorage objects created by web pages, or web pages and extensions. |
|
Editorial approval from Vadim in #41609 (review) so removing my review 👍🏻 |
Description
This PR addresses the dev-docs needed requirements of Bug 1886894 Clear sessionStorage in browsingData.remove() for parity with "Clear Cookies and Site Data". It includes:
browsingData.removeLocalStorage,browsingData.remove, andbrowsingData.DataTypeSetdocumentation.Related issues and pull requests
Related BCD changes in PR mdn/browser-compat-data#28261.